Link to mypy's error code documentation#58
Conversation
karthiknadig
left a comment
There was a problem hiding this comment.
Thanks for the PR 🥳
I have some minor changes. I think we can directly return a CodeDescription from the helper function. That would also mean that the case where we don't have a link will give the same old result as before.
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
|
@Avasam Looks like there is a formatting issue. Can you run |
|
With python/mypy#15435 and python/mypy#15437, up to you if you wanna update the logic in a separate PR or wait for the next mypy release so we can point to stable in this PR using consistent anchors. Or an in-between: point to latest for now. |
|
@Avasam We can point to the latest. With the assumption that the error messages are not going to change significantly. |
|
Sorry to do an update after an approval, but this is much more maintainable. |
Closes #57
I wish there was a better way to map code to url for maintainability, I have opened a doc feature request with mypy to have better way to programmatically link to the codes' doc. Both for better anchors and a way that doesn't span 2 pages.python/mypy#15431Demo:

Which links to https://mypy.readthedocs.io/en/latest/_refs.html#code-import
Other potential improvements: